CFLAGS 		:= -Wall -O2 -fno-builtin -ffreestanding -nostdlib
led_wtd.bin: init.o mem.o interrupt.o uart.o timer.o main.o
	arm-linux-ld -Tgboot.lds -o timer.elf $^
	arm-linux-objcopy -O binary timer.elf timer.bin
	arm-linux-objdump -D timer.elf > timer_elf.dis

%.o : %.S
	arm-linux-gcc $(CFLAGS) -o $@ $< -c

%.o : %.c
	arm-linux-gcc $(CFLAGS) -o $@ $< -c 


clean:
	rm *.o *.elf *.bin *.dis forlinx -f
